package demo1;

/**
 * @Author liangzai
 * @Description:
 */
public class Test {
    public static void eat(Animal animal){
        animal.eat();
    }
    public static void swimming(Iswimming iswimming){
        iswimming.swim();
    }
    public static void fly(Iflying iflying){
        iflying.fly();
    }
    public static void running(Irunning irunning){
        irunning.run();
    }

    public static void main(String[] args) {
//        Dog dog = new Dog("旺财",18);
//        dog.eat();
//        dog.run();

        eat(new Dog("wangcai",18));
        running(new Dog("luoqian",19));
    }
}
